1. Field of the Invention
The present invention relates to a memory system, and in particular, to a key storage and a controller thereof to be added to a real storage device in an information processing apparatus such as a computer.
2. Description of the Related Art
In a control of the real storage device or the main memory device of an information processing apparatus, the storage or memory area is subdivided into real storage blocks each having a fixed size and there are disposed a storage key for each real storage block for a memory management and for a check to determine whether data in the real storage is accessible from a program. An access protection key and an access inhibit bit of a storage key are provided to prevent data and a program in the real storage from being destroyed by mistake or by intention and from being stolen, respectively. Namely, these items are employed to check for a matching condition between the access protection key and a key specified to a program being run in the system. If the matching condition is not satisfied, only a program exception interruption can be caused to take place, for example, to effect a control to stop the run of the program which has attempted an invalid access.
Furthermore, in a system in which a virtual memory system is adopted to effect a paging operation, the real storage block is called a page such that a replacement processing, that is, a paging operation is achieved in a unit of the page by means of an auxiliary storage apparatus. In such a system, in order to determine which one of the pages is to be moved from the real storage to the auxiliary storage, there are provided a reference bit and a change bit in the real storage key. For example, when the reference bit is not on for a page, it is assumed that the page is not used for a relatively long period of time and is hence judged to be moved to the auxiliary storage. Moreover, when the change bit is not on for a page, it is considered that the content of the page is not changed after the previous paging operation and that the data in the auxiliary storage can be utilized again, namely, the actual input/output operation for the paging operation need not be achieved.
Since an allocation of the real storage to a job need only be carried out in a unit of the page described above, it is sufficient to provide a real storage key including a reference bit and a change bit for each page.
For an efficient method of implementing the virtual memory system, the storage is subdivided into pages each having a fixed size such that the page is employed as a unit of the allocation of the storage. This enables an arbitrary free page of the main storage to be allocated and hence the unitization efficiency of the main storage is increased. In a general-purpose computing system, the size of each page is fixedly determined to be 2KB or 4KB in general. However, due to the development of the semiconductor integration technology of late years, a main storage apparatus having a large memory capacity can be realized at a low cost; consequently, without changing the page size of the conventional system, the overhead time of the management becomes to be considerably increased in the operating system. That is, since the number of tables managing the respective pages becomes greater, there arises a difficult problem that the memory volume and the period of time required to search for a page are greatly increased.
In order to solve this problem, a large page need only be allocated; however, since the memory configuration is to be dynamically changed when a memory failure and a variation in the load occur, the conventional page size should be adopted as the basic size such that a page of an arbitrary size is implemented when required. However, if this provision is realized, there exist a plurality of storage keys for a large page, which leads to a problem associated wit a consistency of the storage key. This is because the processors which reference the main storage include an input/output processor in addition to a central processing unit (CPU); furthermore, there exist many programs generated for the conventional page size and hence the compatibility thereof is required to be sustained. A method to solve the problem above is that the operating system guarantees the same key value for all storage keys belonging to a large page. However, when the page size is increased, the number of storage keys also becomes to be greater, and hence the overhead to effect processing for setting and for referencing the storage keys is increased. For example, assuming the basic page size to be 4KB, for an implementation of a large page with a page size of 1MB, the system is required to guarantee the consistency of 256 storage keys, which considerably increases the overhead associated with the page allocation, page replacement, and page input/output operations.
Reference may be made to JP-A-61-165156.